package com.aspose.cells;

public class FilterColumn {
   private int a = 6;
   private Object b;
   private boolean c = false;
   private boolean d = true;
   private int e;
   private FilterColumnCollection f;

   public boolean getVisibledropdown() {
      return !this.c && this.d;
   }

   public void setVisibledropdown(boolean value) {
      this.c = !value;
      this.d = value;
   }

   boolean a() {
      return this.c;
   }

   void a(boolean var1) {
      this.c = var1;
   }

   boolean b() {
      return this.d;
   }

   void b(boolean var1) {
      this.d = var1;
   }

   public Object getFilter() {
      return this.b;
   }

   public void setFilter(Object value) {
      this.b = value;
   }

   public int getFilterType() {
      return this.a;
   }

   public void setFilterType(int value) {
      this.a = value;
   }

   public int getFieldIndex() {
      return this.e;
   }

   public void setFieldIndex(int value) {
      this.e = value;
   }

   FilterColumnCollection c() {
      return this.f;
   }

   FilterColumn(FilterColumnCollection filterColumns, int fieldIndex) {
      this.e = fieldIndex;
      this.f = filterColumns;
   }

   FilterColumn(FilterColumnCollection filterColumns, int fieldIndex, boolean hiddenButton, boolean showButton) {
      this.e = fieldIndex;
      this.f = filterColumns;
      this.c = hiddenButton;
      this.d = showButton;
   }

   void a(FilterColumn var1) {
      this.a = var1.a;
      this.c = var1.c;
      this.d = var1.d;
      switch(this.a) {
      case 0:
         ColorFilter var2 = (ColorFilter)var1.b;
         ColorFilter var3 = new ColorFilter(this);
         this.b = var3;
         var3.a(var2, true);
         break;
      case 1:
         CustomFilterCollection var12 = (CustomFilterCollection)var1.b;
         CustomFilterCollection var13 = new CustomFilterCollection();
         this.b = var13;
         var13.a(var12);
         break;
      case 2:
         DynamicFilter var4 = (DynamicFilter)var1.b;
         DynamicFilter var5 = new DynamicFilter();
         this.b = var5;
         var5.a(var4);
         break;
      case 3:
         MultipleFilterCollection var8 = (MultipleFilterCollection)var1.b;
         MultipleFilterCollection var9 = new MultipleFilterCollection();
         this.b = var9;
         var9.a(var8);
         break;
      case 4:
         IconFilter var6 = (IconFilter)var1.b;
         IconFilter var7 = new IconFilter(this);
         this.b = var7;
         var7.a(var6);
         break;
      case 5:
         Top10Filter var10 = (Top10Filter)var1.b;
         Top10Filter var11 = new Top10Filter();
         this.b = var11;
         var11.a(var10);
      }

   }

   private static boolean d(String var0) {
      return var0.indexOf(63) == -1 && var0.indexOf(42) == -1;
   }

   void a(String var1) {
      if (this.a == 3) {
         MultipleFilterCollection var2 = (MultipleFilterCollection)this.b;
         if (var1 == null) {
            var2.setMatchBlank(true);
         } else {
            var2.a(var1);
         }
      }
   }

   void a(int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8) {
      if (this.a == 3) {
         MultipleFilterCollection var9 = (MultipleFilterCollection)this.b;
         var9.a(var2, var3, var4, var5, var6, var7, var8);
      }
   }

   void b(int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8) {
      if (this.a != 3) {
         this.a = 3;
         this.b = new MultipleFilterCollection();
      }

      MultipleFilterCollection var9 = (MultipleFilterCollection)this.b;
      DateTimeGroupItem var10 = new DateTimeGroupItem(var2, var3, var4, var5, var6, var7, var8);
      var9.a(var10);
   }

   void a(int var1, int var2) {
      IconFilter var3 = new IconFilter(this);
      var3.setIconSetType(var1);
      var3.setIconId(var2);
      this.b = var3;
      this.a = 4;
   }

   void a(CellsColor var1) {
      AutoFilter var2 = this.f.a();
      Worksheet var3 = var2.a();
      ColorFilter var4 = new ColorFilter(this);
      this.b = var4;
      this.a = 0;
      var4.setFilterByFillColor(false);
      Style var5 = new Style(var3.c());
      var5.setPattern(1);
      var5.b = var1.a;
      if (!var1.a.a()) {
         var5.b(34);
      }

      var4.a(var3.c().getDxfs().a(var5));
   }

   void a(int var1, CellsColor var2, CellsColor var3) {
      ColorFilter var4 = new ColorFilter(this);
      var4.setFilterByFillColor(true);
      this.b = var4;
      this.a = 0;
      AutoFilter var5 = this.f.a();
      Worksheet var6 = var5.a();
      Style var7 = new Style(var6.c());
      if (var1 == 0) {
         var7.setPattern(var1);
         var7.b.a(1, 100);
         var7.a.a(1, 101);
      } else if (var1 == 1) {
         var7.setPattern(var1);
         var7.b = var2.a;
         var7.b(34);
         var7.a.a(2, 0);
      } else {
         var7.setPattern(var1);
         var7.b = var2.a;
         var7.b(34);
         var7.a = var3.a;
         var7.b(35);
      }

      var4.a(var6.c().getDxfs().a(var7));
   }

   void b(String var1) {
      if (this.a != 3) {
         this.a = 3;
         this.b = new MultipleFilterCollection();
      }

      MultipleFilterCollection var2 = (MultipleFilterCollection)this.b;
      if (var1 == null) {
         var2.setMatchBlank(true);
      } else {
         var2.b(var1);
      }
   }

   void c(String var1) {
      if (d(var1)) {
         this.a = 3;
         this.b = new MultipleFilterCollection();
         MultipleFilterCollection var2 = (MultipleFilterCollection)this.b;
         var2.b(var1);
      } else {
         this.a(2, var1, false, 6, (Object)null);
      }

   }

   void d() {
      if (this.a != 3) {
         this.a = 3;
         this.b = new MultipleFilterCollection();
      }

      MultipleFilterCollection var1 = (MultipleFilterCollection)this.b;
      var1.setMatchBlank(true);
   }

   void e() {
      this.a = 1;
      CustomFilterCollection var1 = new CustomFilterCollection();
      var1.setAnd(false);
      this.b = var1;
      CustomFilter var2 = new CustomFilter();
      var2.setFilterOperatorType(4);
      var2.setCriteria((Object)null);
      var1.a(var2);
   }

   void a(int var1, Object var2, boolean var3, int var4, Object var5) {
      this.a = 1;
      CustomFilterCollection var6 = new CustomFilterCollection();
      var6.setAnd(var3);
      this.b = var6;
      CustomFilter var7 = new CustomFilter();
      var7.setFilterOperatorType(var1);
      var7.setCriteria(var2);
      var6.a(var7);
      if (var4 != 6) {
         CustomFilter var8 = new CustomFilter();
         var8.setFilterOperatorType(var4);
         var8.setCriteria(var5);
         var6.a(var8);
      }

   }

   void a(int var1) {
      DynamicFilter var2 = new DynamicFilter();
      var2.setDynamicFilterType(var1);
      this.a = 2;
      this.b = var2;
   }

   void a(boolean var1, boolean var2, int var3) {
      Top10Filter var4 = new Top10Filter(var1, var2, var3);
      this.b = var4;
      this.a = 5;
   }

   boolean a(Object var1) {
      switch(this.getFilterType()) {
      case 0:
      case 2:
         return ((DynamicFilter)this.b).a(var1, this.f.a().a().c().n().getSettings().getDate1904());
      case 1:
         return ((CustomFilterCollection)this.b).a(var1, this.f.a().a().c().n().getSettings().getDate1904());
      case 3:
         return ((MultipleFilterCollection)this.b).a(var1);
      case 4:
      default:
         return true;
      case 5:
         return true;
      }
   }

   boolean a(Cell var1, int var2, int var3) {
      switch(this.getFilterType()) {
      case 0:
         return ((ColorFilter)this.b).a(var1, var2, var3);
      case 1:
         return ((CustomFilterCollection)this.b).a(var1, this.f.a().a().c().n().getSettings().getDate1904());
      case 2:
         return ((DynamicFilter)this.b).a(var1, this.f.a().a().c().n().getSettings().getDate1904());
      case 3:
         return ((MultipleFilterCollection)this.b).a(var1);
      case 4:
         return ((IconFilter)this.b).a(var1);
      case 5:
         return true;
      default:
         return true;
      }
   }
}
